﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.MovieRecorder.CompressionConverter
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Data;
using System.Windows.Media;


namespace DnProcessSimulateCommands.MovieRecorder;

public class CompressionConverter : IMultiValueConverter
{
  public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
  {
    int num1 = 0;
    if (((IEnumerable<object>) values).Count<object>() == 2 && values[0] != null)
    {
      double num2 = (double) values[0];
      if (values[1] is DoubleCollection source && source.Contains(num2))
        num1 = source.Count<double>() - source.IndexOf(num2);
    }
    return (object) num1.ToString((IFormatProvider) culture.NumberFormat);
  }

  public object[] ConvertBack(
    object value,
    Type[] targetTypes,
    object parameter,
    CultureInfo culture)
  {
    return (object[]) null;
  }
}
